package com.orange.lswidget.widgets.musicplayer.entry;

import android.content.ComponentName;
import android.content.Context;

public class AcerMusicPlayer extends MusicPlayer {
	private static final String	ASYNC_OPEN_COMPLETE			= "com.android.music.asyncopencomplete";

	private static final String	ACTION_PLAYSTATE_CHANGED	= "com.android.music.playstatechanged";
	private static final String	ACTION_META_CHANGED			= "com.android.music.metachanged";
	private static final String	ACTION_QUEUE_CHANGED		= "com.android.music.queuechanged";
	private static final String	ACTION_PLAYBACK_COMPLETE	= "com.android.music.playbackcomplete";

	private static final String	ACTION_TOGGLEPAUSE			= "com.android.music.musicservicecommand.togglepause";
	private static final String	ACTION_PAUSE				= "com.android.music.musicservicecommand.pause";
	private static final String	ACTION_PREVIOUS				= "com.android.music.musicservicecommand.previous";
	private static final String	ACTION_NEXT					= "com.android.music.musicservicecommand.next";

	public AcerMusicPlayer(Context context) {
		super(context);
	}

	@Override
	public boolean isMusicActions(String action) {
		return ACTION_PLAYSTATE_CHANGED.equals(action)
				|| ACTION_META_CHANGED.equals(action)
				|| ACTION_QUEUE_CHANGED.equals(action);
	}

	@Override
	public String getMpPackageName() {
		return mMusicPlayerManager.getMpAcerPkgName();
	}

	public String getMpClassName() {
		return mMusicPlayerManager.getMpAcerClsName();
	}

	/**
	 * @return "com.android.music.MediaPlaybackService" in package
	 *         "com.android.music"
	 */
	public ComponentName getMpComponentName() {
		return new ComponentName(getMpPackageName(), getMpClassName());
	}

	public String getPlaystateChanged() {
		return ACTION_PLAYSTATE_CHANGED;
	}

	public String getMetaChanged() {
		return ACTION_META_CHANGED;
	}

	public String getQueueChanged() {
		return ACTION_QUEUE_CHANGED;
	}

	public String getPlaybackComplete() {
		return ACTION_PLAYBACK_COMPLETE;
	}

	public String getAsyncOpenComplete() {
		return ASYNC_OPEN_COMPLETE;
	}

	public String getTogglepauseAction() {
		return ACTION_TOGGLEPAUSE;
	}

	public String getPauseAction() {
		return ACTION_PAUSE;
	}

	public String getPreviousAction() {
		return ACTION_PREVIOUS;
	}

	public String getNextAction() {
		return ACTION_NEXT;
	}
}
